<?php

namespace app\api\controller;

class Dtk
{
    public function index(){
        $orders1 = [];
        $host = 'https://openapi.dataoke.com/api/dels/kit/contentParse';
        $version = 'v1.0.0';
        $params['content'] = '1.拍1件，vip 【47.4】
反15卡，到＊手折1.62/斤
荆楚大地长粒籼米共10kg
/ CZ3457 ￥akeyd4slb2L)/ ';
        $result = dtk_request($host, $version, $params);
        echo $result;
    }


    public function detail(){

        $host = 'https://openapi.dataoke.com/api/goods/get-goods-details';
        $version = 'v1.2.3';
        $params['goodsId'] = 'wqtbU9t3jjtbtd-q00MWk5TnxWQgAdMCN';
        $result = dtk_request($host, $version, $params);
        echo $result;
    }

    public function history(){

        $host = 'https://openapi.dataoke.com/api/goods/price-trend';
        $version = 'v1.0.0';
//        $params['id'] = 'jktvUetNb7HJte-0zzX0vKTNyBvZQ96Fx8';
        $params['goodsId'] = 'eqtXUYt6gAtzt0-xoo9PnAF5JQxBY5phe';
        $result = dtk_request($host, $version, $params);
        echo $result;
    }

}